Integrand size = 21, antiderivative size = 104 \[ \int \frac {d+e x+f x^2}{1+x^2+x^4} \, dx=-\frac {(d+f) \arctan \left (\frac {1-2 x}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {(d+f) \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {e \arctan \left (\frac {1+2 x^2}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {1}{4} (d-f) \log \left (1-x+x^2\right )+\frac {1}{4} (d-f) \log \left (1+x+x^2\right ) \]
-1/4*(d-f)*ln(x^2-x+1)+1/4*(d-f)*ln(x^2+x+1)-1/6*(d+f)*arctan(1/3*(1-2*x)* 3^(1/2))*3^(1/2)+1/6*(d+f)*arctan(1/3*(1+2*x)*3^(1/2))*3^(1/2)+1/3*e*arcta n(1/3*(2*x^2+1)*3^(1/2))*3^(1/2)
Result contains complex when optimal does not.
Time = 0.11 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.16 \[ \int \frac {d+e x+f x^2}{1+x^2+x^4} \, dx=\frac {\left (2 i d+\left (-i+\sqrt {3}\right ) f\right ) \arctan \left (\frac {1}{2} \left (-i+\sqrt {3}\right ) x\right )}{\sqrt {6+6 i \sqrt {3}}}+\frac {\left (-2 i d+\left (i+\sqrt {3}\right ) f\right ) \arctan \left (\frac {1}{2} \left (i+\sqrt {3}\right ) x\right )}{\sqrt {6-6 i \sqrt {3}}}-\frac {e \arctan \left (\frac {\sqrt {3}}{1+2 x^2}\right )}{\sqrt {3}} \]
(((2*I)*d + (-I + Sqrt[3])*f)*ArcTan[((-I + Sqrt[3])*x)/2])/Sqrt[6 + (6*I) *Sqrt[3]] + (((-2*I)*d + (I + Sqrt[3])*f)*ArcTan[((I + Sqrt[3])*x)/2])/Sqr t[6 - (6*I)*Sqrt[3]] - (e*ArcTan[Sqrt[3]/(1 + 2*x^2)])/Sqrt[3]
Time = 0.34 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.04, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {2202, 27, 1432, 1083, 217, 1483, 1142, 25, 1083, 217, 1103}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {d+e x+f x^2}{x^4+x^2+1} \, dx\) |
\(\Big \downarrow \) 2202 |
\(\displaystyle \int \frac {f x^2+d}{x^4+x^2+1}dx+\int \frac {e x}{x^4+x^2+1}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {f x^2+d}{x^4+x^2+1}dx+e \int \frac {x}{x^4+x^2+1}dx\) |
\(\Big \downarrow \) 1432 |
\(\displaystyle \int \frac {f x^2+d}{x^4+x^2+1}dx+\frac {1}{2} e \int \frac {1}{x^4+x^2+1}dx^2\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \int \frac {f x^2+d}{x^4+x^2+1}dx-e \int \frac {1}{-x^4-3}d\left (2 x^2+1\right )\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \int \frac {f x^2+d}{x^4+x^2+1}dx+\frac {e \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 1483 |
\(\displaystyle \frac {1}{2} \int \frac {d-(d-f) x}{x^2-x+1}dx+\frac {1}{2} \int \frac {d+(d-f) x}{x^2+x+1}dx+\frac {e \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} (d+f) \int \frac {1}{x^2-x+1}dx-\frac {1}{2} (d-f) \int -\frac {1-2 x}{x^2-x+1}dx\right )+\frac {1}{2} \left (\frac {1}{2} (d+f) \int \frac {1}{x^2+x+1}dx+\frac {1}{2} (d-f) \int \frac {2 x+1}{x^2+x+1}dx\right )+\frac {e \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} (d+f) \int \frac {1}{x^2-x+1}dx+\frac {1}{2} (d-f) \int \frac {1-2 x}{x^2-x+1}dx\right )+\frac {1}{2} \left (\frac {1}{2} (d+f) \int \frac {1}{x^2+x+1}dx+\frac {1}{2} (d-f) \int \frac {2 x+1}{x^2+x+1}dx\right )+\frac {e \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} (d-f) \int \frac {1-2 x}{x^2-x+1}dx-(d+f) \int \frac {1}{-(2 x-1)^2-3}d(2 x-1)\right )+\frac {1}{2} \left (\frac {1}{2} (d-f) \int \frac {2 x+1}{x^2+x+1}dx-(d+f) \int \frac {1}{-(2 x+1)^2-3}d(2 x+1)\right )+\frac {e \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} (d-f) \int \frac {1-2 x}{x^2-x+1}dx+\frac {\arctan \left (\frac {2 x-1}{\sqrt {3}}\right ) (d+f)}{\sqrt {3}}\right )+\frac {1}{2} \left (\frac {1}{2} (d-f) \int \frac {2 x+1}{x^2+x+1}dx+\frac {\arctan \left (\frac {2 x+1}{\sqrt {3}}\right ) (d+f)}{\sqrt {3}}\right )+\frac {e \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {1}{2} \left (\frac {\arctan \left (\frac {2 x-1}{\sqrt {3}}\right ) (d+f)}{\sqrt {3}}-\frac {1}{2} (d-f) \log \left (x^2-x+1\right )\right )+\frac {1}{2} \left (\frac {\arctan \left (\frac {2 x+1}{\sqrt {3}}\right ) (d+f)}{\sqrt {3}}+\frac {1}{2} (d-f) \log \left (x^2+x+1\right )\right )+\frac {e \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}}\) |
(e*ArcTan[(1 + 2*x^2)/Sqrt[3]])/Sqrt[3] + (((d + f)*ArcTan[(-1 + 2*x)/Sqrt [3]])/Sqrt[3] - ((d - f)*Log[1 - x + x^2])/2)/2 + (((d + f)*ArcTan[(1 + 2* x)/Sqrt[3]])/Sqrt[3] + ((d - f)*Log[1 + x + x^2])/2)/2
3.1.16.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[1/2 Subst[Int[(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : > With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*q*r) In t[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Simp[1/(2*c*q*r) Int[(d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && N eQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]
Int[(Pn_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{n = Expon[Pn, x], k}, Int[Sum[Coeff[Pn, x, 2*k]*x^(2*k), {k, 0, n/2}]*(a + b *x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pn, x, 2*k + 1]*x^(2*k), {k, 0, (n - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pn, x] && !PolyQ[Pn, x^2]
Time = 0.23 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.79
method | result | size |
default | \(\frac {\left (f -d \right ) \ln \left (x^{2}-x +1\right )}{4}+\frac {\left (\frac {d}{2}+e +\frac {f}{2}\right ) \sqrt {3}\, \arctan \left (\frac {\left (2 x -1\right ) \sqrt {3}}{3}\right )}{3}+\frac {\left (d -f \right ) \ln \left (x^{2}+x +1\right )}{4}+\frac {\left (\frac {d}{2}-e +\frac {f}{2}\right ) \arctan \left (\frac {\left (1+2 x \right ) \sqrt {3}}{3}\right ) \sqrt {3}}{3}\) | \(82\) |
risch | \(\text {Expression too large to display}\) | \(7878\) |
1/4*(f-d)*ln(x^2-x+1)+1/3*(1/2*d+e+1/2*f)*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/ 2))+1/4*(d-f)*ln(x^2+x+1)+1/3*(1/2*d-e+1/2*f)*arctan(1/3*(1+2*x)*3^(1/2))* 3^(1/2)
Time = 0.29 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.72 \[ \int \frac {d+e x+f x^2}{1+x^2+x^4} \, dx=\frac {1}{6} \, \sqrt {3} {\left (d - 2 \, e + f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, \sqrt {3} {\left (d + 2 \, e + f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, {\left (d - f\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, {\left (d - f\right )} \log \left (x^{2} - x + 1\right ) \]
1/6*sqrt(3)*(d - 2*e + f)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e + f)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/4*(d - f)*log(x^2 + x + 1) - 1 /4*(d - f)*log(x^2 - x + 1)
Result contains complex when optimal does not.
Time = 65.87 (sec) , antiderivative size = 3589, normalized size of antiderivative = 34.51 \[ \int \frac {d+e x+f x^2}{1+x^2+x^4} \, dx=\text {Too large to display} \]
(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)*log(x + (-7*d**5*e + 6*d**5*(-d/ 4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 25*d**4*e*f + 18*d**4*f*(-d/4 + f/ 4 - sqrt(3)*I*(d + 2*e + f)/12) - 15*d**3*e**3 - 18*d**3*e**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) - 25*d**3*e*f**2 + 60*d**3*e*(-d/4 + f/4 - s qrt(3)*I*(d + 2*e + f)/12)**2 - 42*d**3*f**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 72*d**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**3 + 108* d**2*e**2*f*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 20*d**2*e*f**3 - 1 44*d**2*e*f*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**2 - 12*d**2*f**3*(- d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) - 144*d**2*f*(-d/4 + f/4 - sqrt(3) *I*(d + 2*e + f)/12)**3 + 4*d*e**5 + 24*d*e**4*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 15*d*e**3*f**2 + 48*d*e**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2 *e + f)/12)**2 - 54*d*e**2*f**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 288*d*e**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**3 - 20*d*e*f**4 + 180*d*e*f**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**2 + 36*d*f**4*(-d/ 4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) - 72*d*f**2*(-d/4 + f/4 - sqrt(3)*I* (d + 2*e + f)/12)**3 - 8*e**5*f - 96*e**3*f*(-d/4 + f/4 - sqrt(3)*I*(d + 2 *e + f)/12)**2 + 36*e**2*f**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 11*e*f**5 - 48*e*f**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**2 - 6*f** 5*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 144*f**3*(-d/4 + f/4 - sqrt( 3)*I*(d + 2*e + f)/12)**3)/(3*d**6 - 3*d**5*f - 8*d**4*e**2 - 3*d**4*f*...
Time = 0.27 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.72 \[ \int \frac {d+e x+f x^2}{1+x^2+x^4} \, dx=\frac {1}{6} \, \sqrt {3} {\left (d - 2 \, e + f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, \sqrt {3} {\left (d + 2 \, e + f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, {\left (d - f\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, {\left (d - f\right )} \log \left (x^{2} - x + 1\right ) \]
1/6*sqrt(3)*(d - 2*e + f)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e + f)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/4*(d - f)*log(x^2 + x + 1) - 1 /4*(d - f)*log(x^2 - x + 1)
Time = 0.30 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.72 \[ \int \frac {d+e x+f x^2}{1+x^2+x^4} \, dx=\frac {1}{6} \, \sqrt {3} {\left (d - 2 \, e + f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, \sqrt {3} {\left (d + 2 \, e + f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, {\left (d - f\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, {\left (d - f\right )} \log \left (x^{2} - x + 1\right ) \]
1/6*sqrt(3)*(d - 2*e + f)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e + f)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/4*(d - f)*log(x^2 + x + 1) - 1 /4*(d - f)*log(x^2 - x + 1)
Time = 7.98 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.53 \[ \int \frac {d+e x+f x^2}{1+x^2+x^4} \, dx=-\ln \left (x-\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}-\frac {f}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{12}\right )-\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {f}{4}-\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}-\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{12}\right )+\ln \left (x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {f}{4}-\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{12}\right )+\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}-\frac {f}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}-\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{12}\right ) \]
log(x + (3^(1/2)*1i)/2 - 1/2)*(f/4 - d/4 + (3^(1/2)*d*1i)/12 + (3^(1/2)*e* 1i)/6 + (3^(1/2)*f*1i)/12) - log(x - (3^(1/2)*1i)/2 + 1/2)*(f/4 - d/4 + (3 ^(1/2)*d*1i)/12 - (3^(1/2)*e*1i)/6 + (3^(1/2)*f*1i)/12) - log(x - (3^(1/2) *1i)/2 - 1/2)*(d/4 - f/4 + (3^(1/2)*d*1i)/12 + (3^(1/2)*e*1i)/6 + (3^(1/2) *f*1i)/12) + log(x + (3^(1/2)*1i)/2 + 1/2)*(d/4 - f/4 + (3^(1/2)*d*1i)/12 - (3^(1/2)*e*1i)/6 + (3^(1/2)*f*1i)/12)